package com.openness.spider;

/**
 * @author Rain
 * @version 2013-6-20 上午11:24:29
 */

public class SpiderConfig {

	/**
	 * hbase.master
	 */
	private String hbaseMaster = "192.168.1.222:60010";

	/**
	 * hbase.zookeeper.quorum
	 */
	private String hbaseZKQuorum = "192.168.1.222";

	/**
	 * hbase.zookeeper.property.clientPort
	 */
	private String hbaseZKPropertyClientPort = "2181";

	private int hbaseTablePoolSize = 10;

	private int zkSessionTimeout = 300000;

	private int depth = 1;

	private int threads = 3;

	private int threadMaxWaitTimes = 10;

	private int fetchUrls = 20;

	private long htmlBufferSize = 100;

	private long htmlBufferFlushInternal = 10000;

	private long htmlBufferSleepTime = 5000;

	private long urlBufferSize = 1000;

	private long urlBufferFlushInternal = 10000;

	private long urlBufferSleepTime = 5000;

	private long monitorThreadSleepTime = 10000;

	/**
	 * user-agent string that is used for representing your crawler to web
	 * servers. See http://en.wikipedia.org/wiki/User_agent for more details
	 */
	private String userAgentString = "crawler4j (http://code.google.com/p/crawler4j/)";

	/**
	 * Politeness delay in milliseconds (delay between sending two requests to
	 * the same host).
	 */
	private int politenessDelay = 200;

	/**
	 * Should we also crawl https pages?
	 */
	private boolean includeHttpsPages = false;

	/**
	 * Should we fetch binary content such as images, audio, ...?
	 */
	private boolean includeBinaryContentInCrawling = false;

	/**
	 * Maximum Connections per host
	 */
	private int maxConnectionsPerHost = 100;

	/**
	 * Maximum total connections
	 */
	private int maxTotalConnections = 100;

	/**
	 * Socket timeout in milliseconds
	 */
	private int socketTimeout = 20000;

	/**
	 * Connection timeout in milliseconds
	 */
	private int connectionTimeout = 30000;

	/**
	 * Max number of outgoing links which are processed from a page
	 */
	private int maxOutgoingLinksToFollow = 5000;

	/**
	 * Max allowed size of a page. Pages larger than this size will not be
	 * fetched.
	 */
	private int maxDownloadSize = 1048576;

	/**
	 * Should we follow redirects?
	 */
	private boolean followRedirects = true;

	/**
	 * If crawler should run behind a proxy, this parameter can be used for
	 * specifying the proxy host.
	 */
	private String proxyHost = null;

	/**
	 * If crawler should run behind a proxy, this parameter can be used for
	 * specifying the proxy port.
	 */
	private int proxyPort = 80;

	/**
	 * If crawler should run behind a proxy and user/pass is needed for
	 * authentication in proxy, this parameter can be used for specifying the
	 * username.
	 */
	private String proxyUsername = null;

	/**
	 * If crawler should run behind a proxy and user/pass is needed for
	 * authentication in proxy, this parameter can be used for specifying the
	 * password.
	 */
	private String proxyPassword = null;

	public String getHbaseMaster() {
		return hbaseMaster;
	}

	public void setHbaseMaster(String hbaseMaster) {
		this.hbaseMaster = hbaseMaster;
	}

	public String getHbaseZKQuorum() {
		return hbaseZKQuorum;
	}

	public void setHbaseZKQuorum(String hbaseZKQuorum) {
		this.hbaseZKQuorum = hbaseZKQuorum;
	}

	public String getHbaseZKPropertyClientPort() {
		return hbaseZKPropertyClientPort;
	}

	public void setHbaseZKPropertyClientPort(String hbaseZKPropertyClientPort) {
		this.hbaseZKPropertyClientPort = hbaseZKPropertyClientPort;
	}

	public int getHbaseTablePoolSize() {
		return hbaseTablePoolSize;
	}

	public void setHbaseTablePoolSize(int hbaseTablePoolSize) {
		this.hbaseTablePoolSize = hbaseTablePoolSize;
	}

	public int getZkSessionTimeout() {
		return zkSessionTimeout;
	}

	public void setZkSessionTimeout(int zkSessionTimeout) {
		this.zkSessionTimeout = zkSessionTimeout;
	}

	public int getDepth() {
		return depth;
	}

	public void setDepth(int depth) {
		this.depth = depth;
	}

	public int getThreads() {
		return threads;
	}

	public void setThreads(int threads) {
		this.threads = threads;
	}

	public int getThreadMaxWaitTimes() {
		return threadMaxWaitTimes;
	}

	public void setThreadMaxWaitTimes(int threadMaxWaitTimes) {
		this.threadMaxWaitTimes = threadMaxWaitTimes;
	}

	public int getFetchUrls() {
		return fetchUrls;
	}

	public void setFetchUrls(int fetchUrls) {
		this.fetchUrls = fetchUrls;
	}

	public long getHtmlBufferSize() {
		return htmlBufferSize;
	}

	public void setHtmlBufferSize(long htmlBufferSize) {
		this.htmlBufferSize = htmlBufferSize;
	}

	public long getHtmlBufferFlushInternal() {
		return htmlBufferFlushInternal;
	}

	public void setHtmlBufferFlushInternal(long htmlBufferFlushInternal) {
		this.htmlBufferFlushInternal = htmlBufferFlushInternal;
	}

	public long getHtmlBufferSleepTime() {
		return htmlBufferSleepTime;
	}

	public void setHtmlBufferSleepTime(long htmlBufferSleepTime) {
		this.htmlBufferSleepTime = htmlBufferSleepTime;
	}

	public long getUrlBufferSize() {
		return urlBufferSize;
	}

	public void setUrlBufferSize(long urlBufferSize) {
		this.urlBufferSize = urlBufferSize;
	}

	public long getUrlBufferFlushInternal() {
		return urlBufferFlushInternal;
	}

	public void setUrlBufferFlushInternal(long urlBufferFlushInternal) {
		this.urlBufferFlushInternal = urlBufferFlushInternal;
	}

	public long getUrlBufferSleepTime() {
		return urlBufferSleepTime;
	}

	public void setUrlBufferSleepTime(long urlBufferSleepTime) {
		this.urlBufferSleepTime = urlBufferSleepTime;
	}

	public long getMonitorThreadSleepTime() {
		return monitorThreadSleepTime;
	}

	public void setMonitorThreadSleepTime(long monitorThreadSleepTime) {
		this.monitorThreadSleepTime = monitorThreadSleepTime;
	}

	public String getUserAgentString() {
		return userAgentString;
	}

	public void setUserAgentString(String userAgentString) {
		this.userAgentString = userAgentString;
	}

	public int getPolitenessDelay() {
		return politenessDelay;
	}

	public void setPolitenessDelay(int politenessDelay) {
		this.politenessDelay = politenessDelay;
	}

	public boolean isIncludeHttpsPages() {
		return includeHttpsPages;
	}

	public void setIncludeHttpsPages(boolean includeHttpsPages) {
		this.includeHttpsPages = includeHttpsPages;
	}

	public boolean isIncludeBinaryContentInCrawling() {
		return includeBinaryContentInCrawling;
	}

	public void setIncludeBinaryContentInCrawling(
			boolean includeBinaryContentInCrawling) {
		this.includeBinaryContentInCrawling = includeBinaryContentInCrawling;
	}

	public int getMaxConnectionsPerHost() {
		return maxConnectionsPerHost;
	}

	public void setMaxConnectionsPerHost(int maxConnectionsPerHost) {
		this.maxConnectionsPerHost = maxConnectionsPerHost;
	}

	public int getMaxTotalConnections() {
		return maxTotalConnections;
	}

	public void setMaxTotalConnections(int maxTotalConnections) {
		this.maxTotalConnections = maxTotalConnections;
	}

	public int getSocketTimeout() {
		return socketTimeout;
	}

	public void setSocketTimeout(int socketTimeout) {
		this.socketTimeout = socketTimeout;
	}

	public int getConnectionTimeout() {
		return connectionTimeout;
	}

	public void setConnectionTimeout(int connectionTimeout) {
		this.connectionTimeout = connectionTimeout;
	}

	public int getMaxOutgoingLinksToFollow() {
		return maxOutgoingLinksToFollow;
	}

	public void setMaxOutgoingLinksToFollow(int maxOutgoingLinksToFollow) {
		this.maxOutgoingLinksToFollow = maxOutgoingLinksToFollow;
	}

	public int getMaxDownloadSize() {
		return maxDownloadSize;
	}

	public void setMaxDownloadSize(int maxDownloadSize) {
		this.maxDownloadSize = maxDownloadSize;
	}

	public boolean isFollowRedirects() {
		return followRedirects;
	}

	public void setFollowRedirects(boolean followRedirects) {
		this.followRedirects = followRedirects;
	}

	public String getProxyHost() {
		return proxyHost;
	}

	public void setProxyHost(String proxyHost) {
		this.proxyHost = proxyHost;
	}

	public int getProxyPort() {
		return proxyPort;
	}

	public void setProxyPort(int proxyPort) {
		this.proxyPort = proxyPort;
	}

	public String getProxyUsername() {
		return proxyUsername;
	}

	public void setProxyUsername(String proxyUsername) {
		this.proxyUsername = proxyUsername;
	}

	public String getProxyPassword() {
		return proxyPassword;
	}

	public void setProxyPassword(String proxyPassword) {
		this.proxyPassword = proxyPassword;
	}

}
